package joelwilson;

import java.io.IOException;

import com.google.appengine.api.datastore.DatastoreFailureException;
import com.google.appengine.api.datastore.DatastoreTimeoutException;

public class GAEExceptionConverter {

	 public static void packageDataStoreExceptions(RuntimeException exception) throws IOException {
		 if (exception instanceof DatastoreFailureException
				 || exception instanceof DatastoreTimeoutException) {
			 // this is a datastore exception
			 throw new IOException(exception);
		 } else
			 throw exception;
	 }
	
}
